package com.staryea.newcustomer.controller;


import com.staryea.newcustomer.module.User;
import com.staryea.newcustomer.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: hs
 * @Date: 2019/3/15 15:49
 * @Description:
 */
@RestController
public class UserController {

    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    @GetMapping("/user")
    public List<User> listUsers(){

        return userService.listUsers();
    }
}
